Skip to content

Audit SchemaExtensions v3 directives and regenerate both profiles - #3843

Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 16 commits into
powershell-v3from
ramsessanchez-schemaextensions-v3-migration
Nov 12, 2026
Merged

Ramses Sanchez-Hernandez (ramsessanchez) merged 16 commits into
powershell-v3from
ramsessanchez-schemaextensions-v3-migration

Conversation

@ramsessanchez

@ramsessanchez Ramses Sanchez-Hernandez (ramsessanchez) commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

N/A

Changes proposed in this pull request

Complete the SchemaExtensions shared-directive audit without inventing overrides for nonexistent directives, and keep both generated profiles compatible with the normally merged v3 framework.

Final normal target: 6475f3f5beb4908d39ea356db32bf1e0fd3273cb (#3886), normally merged in 7347ce4f143cfd1e4df56e1c03049e4ce09ee234. Current pushed head: c287e134ef7ddccea13617522e724b04fa378263. Existing readiness is unchanged. Earlier audit, profile generation and 08e409a/844672 target history is preserved; earlier runtime proof remains historical, not evidence for the current PATCH contract.

  • Directive scope is only src/SchemaExtensions/SchemaExtensions.md: zero shared cmdlet directives and zero deferred parameter alias/transform or schema/response directives. Preserve the intentionally empty authored configuration and reviewed mapping ledger. No fake overrides, groups, suppressions or naming changes.
  • Explicitly exclude src/readme.graph.md and every profile-local directive. This module change neither edits nor claims migration of those directives.
  • Require v1.0 then beta, preserving existing wrapper/Beta casing. Current audit retains exact aligned operation IDs, original lineage and the six unaffected method/path identities.
  • Profile remains separate runtime context, not a GeneratorConfig setting or authored profile filter. Own tests cover both profiles with derived data on/off, exact names/routes, explicit adapter profiles and the new one-operation PATCH contract.
  • PATCH204 now succeeds with no object, exactly one PATCH and no automatic GET. PATCH200 returns the actual typed response with no second request. Caller-explicit GET is independent. PATCH does not acquire GET-only selection/query inputs or a new PassThru/ReadBack/Refetch switch.
  • These compatible specs contain no required query operations. Existing mandatory path ID, typed bodies, bound headers, ShouldProcess, default List/Get routing and optional GET queries remain intact. No PostPath Fix Kiota PostPath typed navigation without renaming operation types #3881 or optional-query [v3 wrappers] Support arbitrary optional query parameters #3897 implementation is included.

Source and strict validation

$evidence = 'C:\Users\ramsess\.copilot\session-state\c94a4b5f-6be1-49ec-a511-bb8746d66ae3\files\post3886-6475-final'
dotnet test .\tools\WrapperGenerator.Tests\WrapperGenerator.Tests.csproj -c Release --no-restore --filter 'FullyQualifiedName~SchemaExtensionsDirectiveMigrationTests|FullyQualifiedName~CmdletConfiguratorTests|FullyQualifiedName~NamingTests|FullyQualifiedName~RequiredQueryTests|FullyQualifiedName~PatchOperationTests' --logger 'trx;LogFileName=targeted.trx' --results-directory $evidence --nologo -v minimal
.\tools\Get-WrapperDirectiveMigrationInventory.ps1 -Module SchemaExtensions -FailOnUnresolved

Passed: actual TRX total/executed/passed 158/158/158, failed 0, not executed 0; strict inventory exit 0 with rows/mapped/deferred/unresolved 0/0/0/0. Original/current module inputs, source/spec hashes and exact command exits are retained. The existing YamlReader NU1903 advisory and obsolete ManagedIdentityCredential compiler warning remain outside module scope.

Fresh full generation, build and normal packaging

Ran sequentially, v1.0 then beta, using the unchanged shared four-mutex queue:

$queue = 'C:\Users\ramsess\.copilot\session-state\871a5292-dc5b-423e-8083-5165b0006603\files\Invoke-QueuedModuleBuild.ps1'
pwsh -NoProfile -NonInteractive -File $queue -RepoRoot $PWD.Path -Module SchemaExtensions -ApiVersion v1.0 -Configuration Release
pwsh -NoProfile -NonInteractive -File $queue -RepoRoot $PWD.Path -Module SchemaExtensions -ApiVersion beta -Configuration Release

Both use the unchanged full builder with openApiDocs_KiotaCompat; compatible-spec existence and exact Git blobs were checked first. No skipped Kiota, GenerateOnly, NoCollisionData, fallback spec or NO-CMDLETS result qualifies as these full gates. Logs: full-v1.0.log, full-beta.log.

Profile Compatible spec Git blob Fresh full Release build Supplemental normal pack Compiled cloud gates Raw parity
v1.0 121c9a107ef31504c720af9f088c2b7bc685a707 Exit 0, OK, 7 exports, 195.2s Exit 0, OK, 52.2s Global and USGov PASS Exit 0, 7/7
beta a0b0746ade2a173cb4e3aecdd2b299d96b63b39b Exit 0, OK, 7 exports, 118.6s Exit 0, OK, 38.4s Global and USGov PASS Exit 1, baseline 0/7

After each full run, a bounded fresh --no-incremental compile and supplemental package step reused the generated client. SkipKiota is used only for separately recorded packaging, never as the full generation gate:

dotnet build .\src\SchemaExtensions\wrapper\v1.0\Microsoft.Graph.Wrapper.SchemaExtensions.csproj -c Release --no-restore --no-incremental --nologo -v minimal
dotnet build .\src\SchemaExtensions\wrapper\Beta\Microsoft.Graph.Wrapper.SchemaExtensions.csproj -c Release --no-restore --no-incremental --nologo -v minimal
pwsh -NoProfile -NonInteractive -File .\tools\Build-WrapperModule.ps1 -Module SchemaExtensions -ApiVersion v1.0 -Configuration Release -SpecRoot .\openApiDocs_KiotaCompat -SkipKiota -Pack -Prerelease alpha6475v1 -ArtifactsLocation "$evidence\v1.0\packages"
pwsh -NoProfile -NonInteractive -File .\tools\Build-WrapperModule.ps1 -Module SchemaExtensions -ApiVersion beta -Configuration Release -SpecRoot .\openApiDocs_KiotaCompat -SkipKiota -Pack -Prerelease alpha6475beta -ArtifactsLocation "$evidence\beta\packages"

Both nonincremental compiles and both packaging commands passed. Each normal bin/package carries only the module, typed client and Wrapper.Runtime DLLs; manifests require adapted Authentication 2.41.2 and have no dependency preloads. Projects, client, cmdlets and manifests were regenerated, not hand-edited. Latest generated deltas remove PATCH readback and retain normal generator GET whitespace; client/project/lock output is genuinely byte-identical.

Process-local tools: isolated Kiota 1.36.1+fd3bf87790149b87f40f7eae1a5feb9016625943, generation parallelism 1, .NET 10.0.403, PowerShell Core 7.6.9. Adapted normal Authentication 2.41.2 is imported from the exact final-source package root:

C:\Users\ramsess\.copilot\session-state\4aa86cf9-d43c-4d2b-a4a3-aeaed01b8f29\files\authentication-v2-sync\final-source\modules

All 64 file SHA256s match; physical Authentication nupkg SHA256: 2FC09BFE6B70D313BC56DF8ADCCFB1976FB4E90A1898BF8A916B4B8B792898EB. No Gallery substitution, old 2.38 package, Auth/loader shim, injected dependency copies or global installation. Authentication owns the single Kiota/RMS/UriTemplate closure. PS5.1 is unsupported and out of scope.

Fresh normal-package and real offline transport proof

For both profiles:

foreach ($profile in 'v1.0', 'beta') {
    $build = Get-Content -Raw "$evidence\$profile\build-package-proof.json" | ConvertFrom-Json
    pwsh -NoProfile -NonInteractive -File .\tools\Test-WrapperModule.ps1 -PackagePath $build.Package -ApiVersion $profile
    foreach ($cloud in 'Global', 'USGov') {
        pwsh -NoProfile -NonInteractive -File "$evidence\Invoke-FinalCloud.ps1" -RepoRoot $PWD.Path -Profile $profile -Cloud $cloud
    }
    pwsh -NoProfile -File .\tools\Compare-WrapperCmdletNames.ps1 -GeneratedPath ".\src\SchemaExtensions\wrapper\$profile\Cmdlets" -OutLedger "$evidence\$profile\raw-parity.csv"
}

Both production package smoke gates passed: 7 exports/7 manifest entries, zero orphan workers, public dispatcher reaches NoGraphSession and 19 compiled untyped-binding cases. Complex/enum/scalar smoke cases are honestly N/A; typed array/body JSON is proven by actual transport.

All four profile/cloud runtime combinations passed. They use actual normal unpacked manifests and real Connect-MgGraph + GraphHttpClientFactory token pipelines with only offline terminal handlers. The current merged tools\Test-WrapperAuthentication.ps1 lifecycle assertions are retained in a session-only guarded snapshot. Its probe setup imports the normal module into the additional confirmation runspace before Connect, then reapplies the existing Set-MgTestDataStore helper. Actual reflected GraphSession.DataStore.GetType().FullName is asserted and recorded before transport and lifecycle/logout: 27 lifecycle checks plus 18 owned checks per profile/cloud, all Microsoft.Graph.Authentication.Test.Mocks.MockDataStore. No production/Auth/source change or repeat full build was made for this setup correction.

  • Current lifecycle suite: 17 checks, 12 captured HTTP requests, 3 genuine declined No prompts, no HTTP from declined/WhatIf mutations, and 12 single packaged Auth/Kiota identities in correct load contexts per combination. Includes updated one-PATCH204/no-object semantics, typed POST, bodyless DELETE, GET headers, adapter reuse, profile alternation, request-context invalidation, reconnect/disconnect and explicit-token path.
  • Stronger own surface probe: 8 actual HTTP requests per combination. PATCH204 produces zero objects and one PATCH while GET is configured to reject 403; PATCH200 returns its own actual typed model in one PATCH with GET still denied. Bound headers and typed JSON values are verified on each PATCH. Caller-explicit GET separately proves its own 403, then its own headers/select/typed result.
  • Exact seven compiled routes/exports, mandatory path ID, ordinary List default, typed collection results, count and supported optional native GET query encoding pass. Five invalid bindings each reject before HTTP: empty path ID, GET-only Property on PATCH, non-native QueryId, nonexistent PassThru, invalid typed body.
  • Global/USGov generated v1.0/beta roots remain correct while the real factory HttpClient retains https://graph.microsoft.com/v1.0/; shared client and BaseAddress are not mutated.

The first final runtime had not started when the isolation addendum arrived, so these are guarded first-pass lifecycle results in the existing final evidence root, not relabeled old runs. Setup-only CRLF anchor failures and an own terminal EmptyContent fixture failure are retained distinctly; the terminal fixture was corrected only in evidence scripts, and already-passing lifecycle suites were not rerun. No live Graph/OAuth/credential-store operations are intended; actual MockDataStore types are recorded rather than inferred from labels.

Limits and history

Raw beta parity remains the existing Mg versus MgBeta mismatch on all seven metadata routes; no prefix normalization or broad naming fix. Old implicit-refetch/header-loss checks are user-superseded historical behavior, not a remaining #3886 failure. Optional queries and PostPath remain out of scope; offline proof is not live tenant certification.

All original migration and separate profile generation commits remain ancestors. New additive history:

  1. 7347ce4f14: normal final-target merge, no rebase or cherry-pick.
  2. 3288f994c3: own source/test/doc correction for the one-operation contract.
  3. 74c362b035: combined fresh v1.0 Kiota client/cmdlet generation boundary.
  4. c287e134ef: separate combined fresh beta generation boundary.

Canonical evidence: $evidence\handoff.json, with scalar actual TRX counters, complete normal input/spec/Auth identities, full Git scope including deleted/renamed paths, exact commands/exits, profile generation commits, raw build logs, normal package/manifest/assembly hashes, guarded source snapshots, actual datastore checks, HTTP/body/header/request-count captures, compiled cloud proofs and an absolute artifact SHA256 inventory. All older target/failed evidence is preserved; no bin/obj, packages, DLLs or logs are committed. Existing PR readiness is unchanged; nothing is merged, approved, bypassed, closed or archived.

Other links

Record zero shared directives, compatible profile and route evidence, and preserve the empty configuration without synthetic overrides. Cover both compatible specs and the unchanged generated cmdlet surface.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full Kiota 1.36.1 client and wrapper generation plus Release compilation. Both regenerated source sets and generated projects are unchanged after Git line-ending normalization; the client lock records the Kiota version used. The built module exports all seven cmdlets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run full Kiota 1.36.1 client and wrapper generation plus Release compilation, preserving wrapper/Beta casing. Regenerated sources and projects are unchanged after Git normalization; locks record actual tool and compatible spec path casing. The built module exports all seven cmdlets.

Known baseline limitation: beta parity reports six existing Mg versus MgBeta name mismatches. Source identity against the powershell-v3 baseline confirms this audit introduces no rename or suppression; shared generator behavior is outside module directive scope.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pass derived profile context separately for generation, naming and suppression, with both data modes covered. Refresh current aligned operation IDs and compatible spec hashes without changing empty shared directive configuration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run queued full Kiota 1.36.1 and cmdlet generation, project emission, Release compilation and fresh official Authentication 2.38.1 module import on integrated target 08e409a. All seven exports retain exact routes, List default and mutation ShouldProcess parameters; raw parity passes 7/7 routes.

Client and cmdlet sources and generated projects remain unchanged after Git normalization. The real client description hash changes for the current aligned compatible spec; preserve both generators in this profile boundary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run queued full Kiota 1.36.1 and cmdlet generation, project emission, Release compilation and fresh official Authentication 2.38.1 module import on integrated target 08e409a. All seven exports retain exact routes, List default and mutation ShouldProcess parameters; preserve tracked Beta casing.

Client and cmdlet sources and generated projects remain unchanged after Git normalization. The real client description hash changes for the current aligned compatible spec. Raw beta parity retains the existing Mg versus MgBeta limitation on seven metadata routes, including the dispatcher now counted by the current gate; no prefix normalization or broad naming change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Assert explicit current profile on every generated worker with derived data enabled and disabled in both compatible profiles; reject removed bare adapter calls.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Fresh queued full Kiota and cmdlet generation/build on normal target 844672d, followed by supplemental production packaging reusing that client. Generated workers select v1.0 explicitly; the generated project removes obsolete wrapper dependency retention. Client sources and locks are unchanged.

Normal package carries only three owned DLLs and requires adapted Authentication 2.41.2 with no dependency preloads. Actual merged Authentication HTTP gate and package smoke pass: typed POST/PATCH/204-to-GET results, genuine declined confirmations, WhatIf, exact paths, session/profile/assembly identity, plus default GET/list/count, invalid binder zero-HTTP and bodyless DELETE. No binaries or logs committed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Fresh queued full Kiota and cmdlet generation/build on normal target 844672d, followed by supplemental production packaging reusing that client. Generated workers select beta explicitly while shared factory HttpClient retains its v1.0 base; generated project removes obsolete wrapper dependency retention. Client sources and locks remain unchanged, preserving Beta casing.

Normal 3-DLL package and fresh compiled real Authentication transport proof pass: typed POST/PATCH/204GET/refetch, genuine No3, WhatIf0HTTP, exact beta URLs and single Auth/Kiota contexts. Supplemental GET/list/count/query/binder/bodyless DELETE gates pass. Raw Mg/MgBeta naming mismatch and unmerged generic refetch-header limitation are not claimed fixed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document and assert no automatic readback, only non-null own response output, preserved bound headers and no sibling GET query parameters or new readback switches after normal 3886 integration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota/client and cmdlet generation, regenerated projects/manifests, fresh nonincremental Release compilation and normal production packaging on merged 6475f3f. Preserve seven exports, names and route metadata; remove automatic PATCH204 GET. Client/project/lock output remains genuinely unchanged; GET worker whitespace is normal generated output.

Fresh normal-package Global and USGov production-pipeline gates prove PATCH204 no object/one PATCH with GET403, PATCH200 actual typed model/one PATCH, independent caller GET, body/header values, five pre-HTTP binder failures, safety/lifecycle/ALC behavior and actual post-import MockDataStore guards. No runtime-isolation production changes, binaries or artifacts included.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Full queued Kiota/client and cmdlet generation, regenerated projects/manifests, fresh nonincremental Release compilation and normal production packaging on merged 6475f3f. Preserve seven exports, names and route metadata; remove automatic PATCH204 GET. Client/project/lock output remains genuinely unchanged; GET worker whitespace is normal generated output. Preserve Beta casing.

Fresh normal-package Global and USGov production-pipeline gates prove PATCH204 no object/one PATCH with GET403, PATCH200 actual typed model/one PATCH, independent caller GET, body/header values, five pre-HTTP binder failures, safety/lifecycle/ALC behavior and actual post-import MockDataStore guards. Beta/cloud request roots do not mutate global/v1 factory transport; raw beta naming limitation remains unnormalized.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) merged commit 6559951 into powershell-v3 Nov 12, 2026
2 of 3 checks passed
@ramsessanchez
Ramses Sanchez-Hernandez (ramsessanchez) deleted the ramsessanchez-schemaextensions-v3-migration branch November 12, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant